Results 1 to 5 of 5

Thread: Proper use of centerprint command?

  1. #1

    Default Proper use of centerprint command?

    Hey there! I was wondering what the proper usage of centerprint is because just using centerprint "MY TEXT" doesn't seem to work. How should it be used in scripting?

  2. #2

    Default

    You can use the message_print.scr built in to the game, it works like this:

    exec global/message_print.scr::message "My Message Goes Here" NIL 10

    //*** displays text in the center of the screen
    //*** mainly used for hint text (default), but can be for anything
    //*** syntax --------------------------------
    //*** message <string> [no hint text | non-NIL - will display, NIL - won't display] [time to leave message up, default 5 | 0 - means default]


    Or you can use a location print, just have to play around with the location until you get the center of the screen,

    self stufftext "locationprint 500 50 My-Message-Cant-Have-Spaces-This-Way"

  3. #3

    Default

    Tx I'll give give a try to message_print script. locationprint would be a good alternative but I'm pretty sure the message won't be centered for all resolution..but is centerprint bugged? I do remember I`ve had some problems with it a long ago.

  4. #4

    Default

    centerprint works same way as locationprint, via stufftext and replacing spaces with dashes or underscores

    local.text = "Hello_World";
    local.player stufftext ("centerprint " + local.text);

  5. #5
    Senior Member nene81's Avatar
    Join Date
    Nov 2014
    Location
    Seville, SPAIN
    Posts
    180

    Default

    Great eduzappa18 !!!
    I was looking for it some time ago!

    Buen trabajo COMPADRE !!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •